﻿namespace FileSecurityManager.UI
{
    using FileSecurityManager.BizLogic;

    /// <summary>
    /// Interaction logic for FileSecurityManagerScreen.xaml
    /// </summary>
    public partial class MainWindow
    {
        public MainWindow()
        {
            InitializeComponent();

            bool isAdminMode = LoginLogic.CurrentUser.UserRole.RoleName == "SuperAdmin" ||
                                LoginLogic.CurrentUser.UserRole.RoleName == "Admin";

            if (isAdminMode)
            {
                tabUsers.Visibility = System.Windows.Visibility.Visible;
                tabUsers.IsSelected = true;
            }
            else
            {
                tabUsers.Visibility = System.Windows.Visibility.Collapsed;
                tabFiles.IsSelected = true;
            }
        }
    }
}
